home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio / Patchmix / XWindowsSource / struct.h < prev    next >
Text File  |  1992-03-28  |  3KB  |  131 lines

  1. /* $Header: struct.h,v 1.4 90/09/08 12:51:52 mara Exp $
  2.  *
  3.  *  struct.h
  4.  *
  5.  *  Written by Mara Helmuth
  6.  *
  7.  *  Description: Structs for Cmix X graphical interface
  8.  * 
  9.  *  $Log:    struct.h,v $
  10.  * Revision 1.4  90/09/08  12:51:52  mara
  11.  * side panel
  12.  * 
  13.  * Revision 1.3  90/09/05  22:14:04  mara
  14.  * ugen struct flags
  15.  * 
  16.  * Revision 1.2  90/09/02  18:21:15  mara
  17.  * NeXT fixes, mbar methods
  18.  * 
  19.  * Revision 1.1  90/08/27  17:11:19  mara
  20.  * Initial revision
  21.  * 
  22.  * Revision 1.5  90/05/18  23:24:44  mara
  23.  * data_str
  24.  * 
  25.  * Revision 1.4  90/05/18  19:26:16  mara
  26.  * *** empty log message ***
  27.  * 
  28.  * Revision 1.3  90/05/13  15:47:27  mara
  29.  * *** empty log message ***
  30.  * 
  31.  * Revision 1.2  90/01/30  11:08:56  mara
  32.  * ugen, oscil, out, add and param structs
  33.  * preset macro
  34.  * 
  35.  * Revision 1.1  90/01/21  12:56:22  mara
  36.  * Initial revision
  37.  * 
  38.  */
  39.  
  40. /*    maximum number of ugens    */
  41. #define MAX        35
  42.  
  43. /*    command types    */
  44. #define    COMPILE        1
  45. #define DATA        2
  46. #define    RUN        3
  47. #define RESCALE        4
  48. #define PLAY        5
  49. #define RESET        6
  50.  
  51. /*    ugen types    */
  52. #define NONE        0
  53. #define BUZZ        1
  54. #define OSCIL        2
  55. #define RAND        3
  56. #define COMB        10
  57. #define ELLIPTICAL    11
  58. #define EVP        12
  59. #define PLUCK        13
  60. #define RESON        14
  61. #define REVERB        15
  62. #define ADD        20
  63. #define SUBTRACT    21
  64. #define MULTIPLY    22
  65. #define DIVIDE        23
  66. #define OUT        30
  67.  
  68. // mbar methods
  69. #define    UGEN_SELECT    1
  70. #define UGEN_CONVERT    2
  71. #define    PARAM_SET    3
  72. //#define    CONNECT        4
  73.  
  74. #define PRESET        0    
  75. #define PFIELD        -1    
  76.  
  77. typedef struct param_struct {
  78.     int x, y;    /* canvas location */
  79.     int in_ugen;    /* if positive, input unit gen #
  80.                if 0, input is preset to "value"
  81.                if -1, is a pfield
  82.             */
  83.     char value[60];    /* if preset, value set */
  84. } param_str;
  85.  
  86. typedef struct oscil_struct {
  87.     param_str *amp, *freq, *phs, *out;
  88. } oscil_str;
  89.  
  90. typedef struct evp_struct {
  91.     param_str *amp, *rise, *decay, *nfunc, *out;
  92. } evp_str;
  93.  
  94. typedef struct buzz_struct {
  95.     param_str *amp, *freq, *nhar, *out;
  96. } buzz_str;
  97.  
  98. typedef struct rand_struct {
  99.     param_str *out;
  100. } rand_str;
  101.  
  102. typedef struct side_struct {  // for side icons, +, -, x, /
  103.     int num_ins;
  104.     int type;         
  105.     param_str *in0, *in1, *out;
  106. } side_str;
  107.  
  108. typedef struct out_struct {
  109.     param_str *in;
  110. } out_str;
  111.  
  112. typedef struct ugen_struct {
  113.     int type,moving; // moving is a flag, whether icon should be (re)drawn 
  114.     int made;      // whether memory allocated yet
  115.     int connected;  // whether connected to another ugen
  116.     int x,y;     // canvas location 
  117.     oscil_str *oscil;
  118.     evp_str *evp;
  119.     buzz_str *buzz;
  120.     side_str *side;
  121.     out_str *out;
  122.     rand_str *rand;
  123. } ugen_str;
  124.  
  125. typedef struct {
  126.     char inskip[20];
  127.     char outskip[20];
  128.     char dur[20];
  129.     char amp[20];
  130. } data_str;
  131.